package com.it.shiro.controller;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName:SalaryController
 * Package:com.it.shiro.controller
 * Description: 薪资
 *
 * @date:2022/3/30 11:03
 * @author:动力节点
 */

@RestController
@RequestMapping("/salary")
public class SalaryController {

    /**
     *
     */
    @RequiresPermissions("salary")
    @RequestMapping("/query")
    public String query(){

//        Subject subject = SecurityUtils.getSubject();
//        if (subject.isPermitted("salary")) {
//            return "salary";
//        }
        return "salary";
    }
}
